# numbers = [3,4,5,1,2]
numbers = [2,2,2,2,2]
def minArray(numbers) -> int:
    numbersLen = len(numbers)
    if numbersLen == 1:
        return numbers[0]
    flag = True
    left, right = 0, 1
    while right < numbersLen:
        if numbers[right] < numbers[left]:
            return numbers[right]
        if numbers[right] != numbers[left]:
            flag = False
        left += 1
        right += 1
    if flag:
        return numbers[left]
    else:
        return numbers[0]

print(minArray(numbers))